Main = {
    addContent: function(container,content,chaild){
        if(chaild!=undefined) chaild.remove();
        container.append(content);
    },

    addMessage: function(message){
        var notify=$('div.message');
        notify.html(message);
    },

    addError: function(error){
        var notify=$('div.message');
        notify.removeClass('message');
        notify.addClass('error');
        notify.html(error);
    },

    closePopup: function(popup){
        if(popup==undefined) popup=$('#detail-wrapper-container');
        $('.bgdark').css('display','none');

        popup.css('display','none');
    },

    openPopup: function(popup){
        if(popup==undefined) popup=$('#detail-wrapper-container');
        popup.css('display','block');
        var top=($(window).height()-popup.height())/2;

        popup.attr('style', 'top: '+top+'px;');
        //$('div.bgdark').css('display', 'block');
    }
}